const express = require('express')
const router = express.Router()
const taskController = require(process.cwd() + '/controllers/taskControllers')

router.get('/getAllTasks',taskController.getUserAllTasks)
router.post('/insertOneTask',taskController.addTask)
router.post('/updateTaskById',taskController.updateTask)
router.post('/deleteTaskById',taskController.deleteTask)
router.put('/updateTaskById',taskController.updateTask)
router.put('/finishedTaskById/:id',taskController.updateTask)
router.get('/get-StatusCount',taskController.countTaskByStatusInTheWeek)
router.get('/getTasksByStatus/:status',taskController.getTasksByStatus)

module.exports = router
